1. Field of the Invention
The present invention relates to an image processing apparatus, image processing method, and computer-readable medium. Particularly, the present invention relates to an image processing technique of determining whether an input image containing a gradation is a vectorization target.
2. Description of the Related Art
Recently, an opportunity to use one image information in different devices is growing. This boosts demands for higher compression ratios to reduce transmission cost between devices and higher image qualities to cope with a resolution difference between devices. User friendliness requires editability so that an image can be partially edited again. Under the circumstance, a vectorization technique is needed to convert an image expressed in the raster format into a vector format capable of easy re-editing regardless of the resolution.
Japanese Patent Laid-Open No. 2006-344069 discloses a vectorization technique for an image in which the color difference is clear, such as an illustration or clip art. In this method, an image is input, and the number of colors of the input image is reduced using color similarity. The contour line of each obtained color region is extracted and approximated by a function, and vector data is output in addition to color information.
Japanese Patent Laid-Open No. 2007-272456 discloses a vectorization method for an image containing a linear gradation or radial gradation. In this method, the color gradient between pixels in an image is calculated, a gradation region is determined using the result, and a path having pixels of almost the same color is generated for the obtained gradation region. A perpendicular to the path is defined, a representative color value is calculated on the perpendicular, and vectorization is executed.
However, when an image accompanied by a complicated color change, such as a photograph, is input and vectorized by the above technique, the vectorization leads to poor image quality, low compression ratio, long processing time, and the like. To prevent this, Japanese Patent Laid-Open No. 2007-158725 discloses a technique of determining whether an input image is a vectorization target. In this method, an input image is clustered by color quantization, and whether the input image is a vectorization target is determined using the number of obtained clusters and the variance of color within a region in the cluster. However, this method uses the variance of color to determine whether an input image is a vectorization target. Thus, even an image formed from only a gradation region capable of vectorization by the technique as disclosed in Japanese Patent Laid-Open No. 2007-272456 is determined as a photographic region.
Japanese Patent Laid-Open No. 2010-146218 discloses another method of determining whether an input image is a vectorization target. In this method, an input image is clustered by color quantization, labeling is executed to obtain a connected region on the obtained cluster map, and whether the input image is a vectorization target is determined using the number of obtained labels and the number of pixels within a label. This method can determine an image in which many small regions are generated, but cannot determine whether an input image containing a gradation is a vectorization target.
Hence, a technique of determining whether a gradation region in an image is a vectorization target has not been proposed.
The present invention has been made to solve the above problems, and determines whether an input image containing a gradation is a vectorization target.